<template>
  <div id="loginLayout">
    <a-layout
      style="min-height: 100vh; display: flex; justify-content: center; align-items: center"
    >
      <a-card class="login-card">
        <template #cover>
          <img alt="Brand Logo" src="@/assets/logo.ico" class="login-logo" />
        </template>
        <a-layout-content class="content">
          <router-view></router-view>
        </a-layout-content>
        <a-layout-footer class="footer">
          <a href="https://gitee.com/kkwwk/w-picture" target="_blank">w-pricture 云图库</a>
        </a-layout-footer>
      </a-card>
    </a-layout>
  </div>
</template>

<script setup lang="ts"></script>

<style scoped>
#loginLayout {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #f0f2f5; /* 设置一个轻柔的背景色 */
}

#loginLayout .login-card {
  width: 400px;
  max-width: 90%; /* 确保在小屏幕上不会溢出 */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  overflow: hidden;
  background-color: white;
}

#loginLayout .login-logo {
  height: 60px;
  object-fit: contain;
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-top: 20px; /* 增加顶部边距 */
}

#loginLayout .content {
  padding: 24px;
}

#loginLayout .footer {
  text-align: center;
  padding: 16px;
  color: #777;
  border-top: 1px solid #ddd;
}

/* Media Queries for Responsive Design */
@media (max-width: 768px) {
  #loginLayout .login-card {
    width: 100%;
    padding: 16px;
  }

  #loginLayout .login-logo {
    height: 40px;
    margin-bottom: 16px;
    margin-top: 16px;
  }

  #loginLayout .content {
    padding: 16px;
  }

  #loginLayout .footer {
    padding: 12px;
  }
}
</style>
